package org.example.springbook.model;

import lombok.Data;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 22652
 * Date: 2024-07-14
 * Time: 16:02
 */
@Data
public class PageRequest {
    /**
     * 当前页码
     */
    private Integer currentPage = 1;
    /**
     * 每页显示条数
     */
    private Integer pageSize = 10;

    private Integer offset;

    public Integer getOffset() {
        return (currentPage - 1) * pageSize;
    }
}